<template>
  <div class="page">
    <au-image v-for="(it,index) of dataList" :key="it.id" :index="index" v-show="index==selectedIndex"></au-image>
  </div>
</template>

<script>
import auImage from "@/components/auImage";
import {mapState ,mapGetters} from "vuex"

export default {
  name: "auContent",
  components:{
    auImage
  },
  computed:{
    ...mapState({
      dataList: state => state.dataList,
      selectedIndex: state => state.selectedIndex,
    }),
  },
  watch:{
    dataList:{
      deep:true,
      handler(val){
        this.$forceUpdate();
      }
    },
  },
  methods:{

  }
}
</script>

<style scoped lang="scss">
.page{
  height: 100%;
}
</style>
